<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="admin/_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <!--首先完成移动端的预览设置问题,设备的宽度初始缩放倍数为1.0倍，这里还可以设置用户禁止缩放等等-->
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>友链修改</title>
    <!--接下来进行semanticUI的css CDN的引用-->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.css">
    <!--引入我们自己写的css-->
    <link rel="stylesheet" href="../../static/css/me.css" >

    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
</head>
<body>

    <!--导航栏-->
    <nav th:replace="admin/_fragments :: menu(5)" class="ui  inverted attached segment m-padded-tb-mini m-shadow-small">

        <!--container的好处很多，其中之一使得设备正常显示-->
        <div class="ui  container">
            <!--使用一个菜单来放我们所有的导航链接-->
            <div class="ui  inverted  secondary stackable menu">

                 <h2 class="ui  teal header item">管理后台</h2>
               &nbsp;
               <a class="active item m-item m-mobile-hide"><i class="fas fa-carrot"></i>博客</a>
               <a class=" item m-item m-mobile-hide"><i class="fas fa-ice-cream"></i>分类</a>
               <a class="item m-item m-mobile-hide" ><i class="fas fa-candy-cane"></i>标签</a>

                <div class="right menu">
                    <div class="ui dropdown item">
                        <div class="text">
                            <img class="ui avatar image" src="https://unsplash.it/100/100?image=1005">
                            曾中杰
                        </div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <a href="#" class="item">注销</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </nav>


    <!--中部主体-->
    <div class="m-padded-tb-big ">
        <div class="ui container" >
            <form action="#" th:action="*{id} != null ? @{/admin/friends/{id}/input(id=*{id})} : @{/admin/friends/input}" th:object="${friend}" method="post" class="ui form">
                <input type="hidden" th:value="*{flag}" name="flag">

                <div class="field">
                    <div class="ui left labeled input">
                        <label class="ui compact teal basic label">网址</label>
                        <input th:value="*{website}" type="text" name="website">
                    </div>
                </div>

                <div class="field">
                    <div class="ui left labeled input">
                        <label class="ui compact teal basic label">名称</label>
                        <input th:value="*{nickname}" type="text" name="nickname">
                    </div>
                </div>
                <div class="field" th:unless="*{occupation}==null">
                    <div class="ui left labeled input">
                        <label class="ui compact teal basic label">职业</label>
                        <input th:value="*{occupation}" type="text" name="occupation">
                    </div>
                 </div>
                <div class="field">
                    <div class="ui left labeled input">
                        <label class="ui compact teal basic label">描述</label>
                        <input th:value="*{description}" type="text" name="description">
                    </div>
                </div>
                <div class="field" th:unless="*{avatar}==null">
                    <div class="ui left labeled input">
                        <label class="ui compact teal basic label">头像</label>
                        <input type="text" th:value="*{avatar}"  name="avatar">
                    </div>
                </div>

                <div class="ui success message" th:unless="${#strings.isEmpty(message)}">
                    <div class="header" th:text="${message}"></div>
                </div>

                <div class="ui right aligned container">
                    <button type="button" class="ui button" onclick="window.history.go(-1)">返回</button>
                    <button class="ui teal button" >提交</button>
                </div>

            </form>

        </div>
    </div>
    <br><br><br> <br><br><br> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>

    <!--底部footer栏-->
    <footer th:replace="admin/_fragments :: footer" class="ui inverted vertical segment m-padded-tb-massive">

            <!--这里的结构其实跟nav尽量保持一致-->
            <div class="ui center aligned container m-padded-tb-mini">

                <div class="ui stackable inverted divided grid">

                    <div class="three wide column">
                        <div class="ui inverted link list">
                            <div class="item">
                                <img src="../../static/images/qrcode.jpg" class="ui rounded image" style="width: 110px">
                            </div>
                        </div>
                    </div>
                    <div class="three wide column">

                        <h4 class="ui inverted header m-text-spaced m-opacity-small">最新博客</h4>

                        <div class="ui inverted link list ">
                            <a href="#" class="item">用户故事(User Story)</a>
                            <a href="#" class="item">用户故事(User Story)</a>
                            <a href="#" class="item">用户故事(User Story)</a>
                        </div>
                    </div>

                    <div class="three wide column">
                        <h4 class="ui inverted header  m-text-spaced m-opacity-small">联系我</h4>
                        <div class="ui inverted link list m-text-lined">
                            <a href="#" class="item">QQ:1474159935</a>
                            <a href="#" class="item">Wechat:zeng1474159935</a>
                            <a href="#" class="item">Email:1474159935@qq.com</a>
                        </div>
                    </div>

                    <div class="seven wide column">
                        <h4 class="ui inverted header  m-text-spaced m-opacity-small">关于我</h4>
                        <p class="m-text-thin m-text-spaced m-opacity-mini">不知你是否跟我一样，喜欢了解他人如何快乐的生活，积极向他们寻求生活的乐趣。
                           一起勇敢前行吧。</p>
                    </div>
                </div>
                <!--这里是一根线-->
                <div class="ui inverted section divider"> </div>
                <p class="m-text-thin m-text-spaced m-opacity-mini">Copyright©2019-2020zzj Designed by zzj</p>
            </div>


    </footer>

    <th:block th:replace="admin/_fragments :: script">
<!--也许用到的jQuery的引用-->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<!--这里进行semanticUI的js 的CDN的引用 -->
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
</th:block>

 <script>
        $('.ui.form').form({
            fields : {
                title : {
                    identifier: 'name',
                    rules: [{
                        type : 'empty',
                        prompt: '请输入分类名称'
                    }]
                }

            }
        });

    </script>
</body>
</html>